/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package calc;

import javax.ejb.EJB;
import javax.naming.InitialContext;

/**
 *
 * @author v
 */
public class Main {
    @EJB
    private static NewSessionBeanRemote remote;
    /**
     * @param args the command line arguments
     */
    public Main(String [] args) {
         /*try {
            InitialContext ic = new InitialContext();
            remote = (NewSessionBeanRemote)
                    ic.lookup(NewSessionBeanRemote.class.getName());
        } catch (Exception ex) {
            System.out.println("Couldn’t create converter bean."+
                    ex.getMessage());
        }*/
    }

    public static void main(String[] args) {
        Main m = new Main(args);
        m.doOperation();
        
    }

    private void doOperation() {
        try {
            int sum = remote.sum(10, 5);
            System.out.println("somma " + sum);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
